var config = require("../../config/index");
var timeUtils = require("./timeUtils");
module.exports = {
  post(data) {
    var url = config.logServer + "/api/logs/add";
    return http.postJson(url, data);
  },
  log(msg, type) {
    type = type || 1;
    return this.post({
      battery: device.getBattery(),
      type: type,
      msg: msg,
      mobile: config.mobile,
      timeStamp: Date.now(),
    });
  },
};
